package com.niit.session13.homework;

import java.util.Scanner;

public class Business {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int day = sc.nextInt();
//		出差的周数
		int week = day/7;
		if(day%7>0) {
			week++;
		}
		System.out.println(week*500);
		
	}

}
